<div class="layui-header header header-doc">
	<div class="layui-main">
		<a class="logo" href="/index.htm">
			<img src="${httpRootPath}/resources/main/images/logo1.png" alt="layui">
		</a>
		<ul class="layui-nav">
			<#if type == "1">
				<li class="layui-nav-item layui-this">
					<a href="projectManage.htm">项目管理</a>
					<dl class="layui-nav-child">
						<dd><a href="projectAdd.htm">添加项目</a></dd>
					</dl>
				</li>
			<#else>
				<li class="layui-nav-item">
					<a href="projectManage.htm">项目管理</a>
					<dl class="layui-nav-child">
						<dd><a href="projectAdd.htm">添加项目</a></dd>
					</dl>
				</li>
			</#if>

			<#if type == "2">
				<li class="layui-nav-item layui-this">
					<a href="userManage.htm">用户管理</a>
					<dl class="layui-nav-child">
						<dd><a href="userAdd.htm">添加用户</a></dd>
					</dl>
				</li>
			<#else>
				<li class="layui-nav-item">
					<a href="userManage.htm">用户管理</a>
					<dl class="layui-nav-child">
						<dd><a href="userAdd.htm">添加用户</a></dd>
					</dl>
				</li>
			</#if>

			<#if type == "3">
				<li class="layui-nav-item layui-this">
					<a href="userManage.htm">用户组管理</a>
					<dl class="layui-nav-child">
						<dd><a href="userAdd.htm">添加用户组</a></dd>
					</dl>
				</li>
				<#else>
					<li class="layui-nav-item">
						<a href="userManage.htm">用户组管理</a>
						<dl class="layui-nav-child">
							<dd><a href="userAdd.htm">添加用户组</a></dd>
						</dl>
					</li>
			</#if>

			<#if type == "4">
				<li class="layui-nav-item layui-this">
					<a href="userManage.htm">我的权限</a>
				</li>
				<#else>
					<li class="layui-nav-item">
						<a href="userManage.htm">我的权限</a>
					</li>
			</#if>


			<#if type == "5">
				<li class="layui-nav-item layui-this">
					<a href="userPassword.htm">修改密码</a>
				</li>
			<#else>
				<li class="layui-nav-item ">
					<a href="userPassword.htm">修改密码</a>
				</li>
			</#if>

		</ul>
		<div class="nav-user">
			<a class="unlogin"><i class="layui-icon" style="font-size: 20px; color: #5FB878;">&#xe612;</i></a>
			<span><a href="javascript:loginout()">退出</a></span>
		</div>
	</div>
</div>
<script>
	function loginout(){
        var $ = layui.jquery;
        //询问框
        layer.confirm('您确定要退出吗？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            layer.closeAll();
            //加载层
            var index = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
            //loading层
            var index = layer.load(1, {
                shade: [0.1,'#fff'] //0.1透明度的白色背景
            });
            $.ajax({
                type: "post",
                url: "/logout.do",
                cache: false,
                async : false,
                dataType: "json",
                success: function (data ,textStatus, jqXHR){
                    window.location.href = "login.htm";
                },
                error:function (XMLHttpRequest, textStatus, errorThrown) {
                    layer.alert('网络异常');
                }
            })
        }, function(){

        });
	}
</script>